package com.chb.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Configuration;

/**
 * @description:
 * @author: CHB
 * @create: 2021-11-22 16:12
 **/
@Configuration
public class MyBatisConfiguration {
    /**
     * sql 日志
     *
     * @return SqlLogInterceptor
     */
//    @Bean
    @ConditionalOnProperty(value = "mybatis-plus.sql-log", matchIfMissing = true)
    public SqlLogInterceptor sqlLogInterceptor() {
        return new SqlLogInterceptor();
    }
}
